<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title><%= SITE_NAME %> | <%=@page_title %></title>
    
		<%= stylesheet_link_tag 'reset-fonts-grids'%>
	  <%= stylesheet_link_tag 'default' %>
		<%= stylesheet_link_tag 'catalogue' %>
		<%= stylesheet_link_tag 'pagination' %>
		<%= javascript_include_tag :defaults, 'widgets', 'jquery-1.2.6.min.js', 'jquery-ui-personalized-1.5.2.min.js', 'jquery.pagination.js', 'jquery.history.js' %>
    <%= javascript_tag "var AUTH_TOKEN = #{form_authenticity_token.inspect};" if protect_against_forgery? %>

    <script type="text/javascript">
      var jQ = jQuery.noConflict();
    </script>
		<link rel="alternate" type="application/rss+xml" title="RSS" href="/catalogue/rss" />
	</head>
	<body>
		<div id="doc2" class="yui-t2">
		    <div id="hd">
		    	<div id="logo">
		    	  <a href="/" title="Click to go to the Empower Artists homepage"><img src="/images/paintWorldLogo.png" alt="Empower Artists world logo" /></a><p>-<a href="/">EA</a>-</p>
		    	</div>
				<div id="hd_main_wrapper">
					<div id="hd_text">
						<div id="hd_right_links">
						  <% if !logged_in? %>
						    <%= link_to User.l_attr('login'), login_url %> |
                <%= link_to User.l_attr('register'), register_url %>
              <% else %>
                <strong><%= current_user.email %></strong>
                <% if current_user.has_role? :superadmin then %> 
                  | <%= link_to 'Superadmin', superadmin_path %> 
                <% end %> 
                <% if (current_user.has_role? :admin) || (current_user.has_role? :superadmin) then %>
                  | <%= link_to 'Admin', admin_url %> 
                <% end %> 
                  | <%= link_to l(:common, 'account'), change_password_url %> | <%= link_to User.l_attr('logout'), logout_url %>
              <% end %>
            </div>
						<p><strong>Our Mission:</strong> Empower artists</p>
					</div>
					<div id="hd_search">
						<form method="get" action="/search">
						<div style="margin-top: 3px;">
						<span><%= l(:search, :main)%>:</span>
						<input id="q" type="text" name="q" />
						<input type="submit" value="<%= l(:search, :button)%>" />
						</div>
						</form>
						<div id="cart_hd">
							<a id="cart_link" href="/cart/index"><%= Cart.l_attr('longer name')%>
							<% if @cart %>
							<%= render :partial => "cart/cart" %>
							<% end %>
							</a>
						</div>
					</div>
				</div>
		    </div>
		    <div id="bd">
		        <div id="yui-main">
		            <div class="yui-b">
		              <% if flash[:notice] %>
		                <p class="flashNotice"><%= flash[:notice] %></p>
                  <% end %>
                  <% if flash[:error] %>
                    <p class="flashError"><%= flash[:error] %></p>
                  <% end %>
                  <br />
						      <%= yield  %>
					      </div>
				    </div>
				<%= render :partial => "layouts/customer_navigation" %>
			</div>
		    <div id="ft">
          <strong>Empower Artists</strong> <%= l(:layout, 'footer message') %> <%= link_to l(:common, 'learn more') + ' &raquo;', url_for(:controller => 'home', :action => 'learn_more') %>
          <div class="center"><%= link_to l(:common, 'about us'), url_for(:controller => 'home', :action => 'about_us') %> | <%= link_to l(:common, 'our mission'), url_for(:controller => 'home', :action => 'mission') %> | <%= link_to l(:common, 'terms'), url_for(:controller => 'home', :action => 'terms') %> | <%= link_to l(:common, 'feedback'), url_for(:controller => 'feedbacks', :action => 'new') %> | <%= link_to l(:common, 'help') %></div>
  		</div>
    </div>
	</body>
</html>		